1. Field of the Invention
The present invention relates to an encoder for dividing data Y into a scale factor SF, a word length WL, and a data value X and for encoding the divided data, and a decoder for decoding the encoded data Y to obtain decoded data Y.
2. Description of the Related Art
Conventionally, audio or image data is encoded into a compressed form for storage or transmission. One such data encoding methods may be one in which data is divided into a scale factor SF, a word length WL, and a data value X before encoding. With this method, a word length WL and a scale factor SF are obtained from the original value of data Y. Moreover, a data value X is also obtained from the Expression below. EQU X=Y.multidot.{2.sup.(WL-1) -1}/SF
wherein the scale factor SF is divided into SFN and SFO based on the relationship expressed as SF=2.sup.(SPN/3-SFO).
Also, for decoding, the original value of data Y must be calculated using the inputted SFN, SFO, WL, and X, based on the following expressions. EQU Y=SF.multidot.X/{2.sup.(WL-1) -1},
wherein EQU SF=2.sup.(SPY/3-SFO)
Conventionally, the above values are calculated by a microcomputer, or the like, using appropriate software.
However, such calculation using software may take time. In particular, when an MD (mini-disk) playback machine is used, it is preferable to use a single integrated circuit for the above decoding operation, and the entire circuit is therefore desired to have a simple structure and capable of high speed calculation. This leads to a demand for a hardware calculation circuit having a simple structure.